cleaned up rb python script