add profiling
fix debug
move everything to dict. Made dict - default impl
test added