delete un-used function
add lock to renew operation
add MinSize and MaxSize bound checking
delete unnecessary check