some refactors for consistency