Finished primary logic