moved to psutil for memory consumption measurement