adding statement button functionality