add app factory