bottom up approach example