better pocket implementation