ps function(bug exits)
ps implementation: fix overflow
merge ps into master