Extended functionality to take into account decimal amount.
Included tests for the this functionality.