removed memoized function
added some functions