reformated to K&R style