add shape check