refactored, created guess checker