Dirty implementation of user-defined procs