added total variable above the function
added workspace file to idea folder