added 'pure' and working demo