position timer functionality, accordion expansion pseudocode