added function header to constructer