updated error functions & calls