some helper methods