added update_study function