finished mexShape I think