Implement figure
Add tests