moved timeline code to a snippet