refactoring
fixed conflicts i think