adds small changes and refactors