working a little bit on memcache functions, will add more comprehensive code tomorrow