this looks like an assignment on stacking :D