remove silly recursive function