demo code hacky but complete, with the exception of the crystal