Added solve function

consolidated solving the first layer and cross