success and timeout functions working