Working version which can also play back audio