first working version. Still lacks a lot of features.