code refactoring
fixed merging conflicts