added space after end curly brace in if statement