After feedback, added error handling etc...