used JSHint to apply consistent indentation