many additions to the calculate current function

This is the pre-bedtime version that is executing.  Whether or not it is giving correct answers hasn't been checked.