more improvaments to make it work better