- Added input datatype checking and some todo comments for the full implementation