corrected the fact that we were defining the same function twice in different places, replaced with a function call instead