Lab 1 and lab2 optimized
Implemented restriction logic
lab3: create function get value logic
lab3: create gradient logic