as promised Im drying the code up a bit