Made function prettier