first basic working version with new approach