implementing some functions acording to new style
cleaning