moved functions
moved functions
merged with new structure and fixed conflicts
removed misnamed file