fix bug - was calling wrong function