utilities implemented in python