updated controls logic