Pseudocode written for buttons