Basic functionality works
Added error handling