started to rewrite with mvvm