Removing duplicate code for printing ec2 price table