some refactoring
add matplotlib based ui (temp)