try to call funtion in layer.js