corrected code for show expenses