refactored, testing working
testing working, refactored sources