function bounce now receive an object