adding transctions
refactoring, removing unused methods