some refactorage