basic working version has been written