changed function coding style