initial implementation - needs tests and bin