updated testing code to follow coding style of rest of code