Everything seems to be working as expected. Things can be made better but this is a working version