cleaned up / some refactor