refactors code
improves title
merging