fix capitalize function