improved error handling + pages