added extra heads

and some refactoring