revised codes to follow code convention