cleaned up some code
merge conflict, try to resolve