Reworked sample to make it actually compile