added readme, refactored a little