wrap view functions in set_timeout