Debugged summary

Now function properly returns values.