[fix] add semicolon
[major] move optimize to pipe instance