refactored #1