applied datadlayer to step 2 and 4