sets up logic for initial button