first implementation in python, supercool lang!