profit loss funcs added