Added comments
Added validation