basic recreation of top in python3