first pass at writing ifunc class