add generic support, return exact type ever since
introduce PillScanner