pre-alg sample 3