extracted script to js file
added style