Click here for a sample that covers all logic.