created working version