basic functionality mostly complete