updated a2.sql method 6