adding js and improve server