restyled the code