Working code with interest validation