final code for verification