added transform_if function
moved header and source files to separate folders