resposibility javascript fixed