added some more logic from my css framework