implemented plugin engine (fix #11)