final code for vision assignment