add error handling (not sure if working)