removed js and moved to external file