working on supervised learning code