completed ZInOut class