Code refactoring;
Added curly brackets and renamed variables