add javascript, update layout