added switch to specify if is an expense or income