build into lib.model