refactoring cont.