add guard and spork support
add spork and guard support, remove couter_cache, refactor code