code cleanup; remove unnecessary methods
move out utility methods