Added cache function
Fix get function
added some util functions