fixing js calling funtion in contest
sill handling issues with js function not responding
Code Refactored