adding some logics changes