Implemented part of business logic for badges