modifications made and ready for code clean up