implemented stack method for latest keyword used