Feature extraction function implemented, assignment 6 completed.