Use pythonic code