moved css/html into dep function