avoid to overflow, memolization