Make these callbacks more of functional programming

dunno if this is good idea...