working on improving the code and fixing issues as I notice them