it now supports different shapes. Closes #1.