minor mistake: missed var declaration