added method to process single samples