Final working version 2.0