Added time stamps and changed around if else if statements chain order.