just refactorings to remove extra lines of code