inital working version
