fixing old deprecated javascript method