add count method
add pop method
refactoring pop