refactoring cont'd