-- Fixed. implemented correctly. now it works