add console and test script
refactor whole helper methods
add Mat helper methods