added a debug line
added an attempt at caching