Final

Added comments and fixed formula.