refined code and css methods