added offer js funcs