Need some error handling here, and possibly some sort of wait indicator?