improved ui and added javascript