implemented pcall, a powerful error handling tool