getting used to variable assignment and defining functions, weird return practice