successful compile now working on the logics