merged everything and tested, working