added more informative error messages
removed old timing/wait function stuff