wip - major commit with all functionality