Defining functions and trying lab