same code but a little bit prettier