added profile tests and modified behaviour