Refactored upto the selecting variables page 2