Step5: Debug and extra function