random stuff done in perl