added Memoery api
added Pattern api