i really wished that perl had builtin exception handling.... lame...