added theta loop for same theta