Changed code to use abstract Shape class