refactored into multiple files
added readme