worked out the basic functionality