fix some function bugs
update CSS