cleaning up code
conflicts merged