modified functionality with classes