Modified button functionality