Before working on the more main funciton.