all working so far, needs more convenience functions