Removed single line curly brackets and removed var and replaced with correct type.