php logic full rewrite
fix duplication of css