refactor finished
NOT TESTED, NOT USABLE