model done, added unit factory