add more utility functions
improve phpcs compliance