well that was fun. I dont hate Javascript anymore