Changing function casing
Tweaking logic