cover all logic and helper functions