added basic q2 algorithm