added unit testing and fix twig extension time