exported some helper functions