minor code refactoring
basic context detection for pickup