implemented bid function with live js rendering