complete except arrays, needs more testing