Fixed Bugs with function returning string. Added feature