added conditional to determine shape