fix bug in how the functions are being called