added buildFunction functions