implemented button click functionality for last screen