add test
simplify few code
replaces schema