-- added css
-- refactored JS function