constructer class for data
simple form if statement correction