begin implementing error handling