removed profile and moved it to a condition