changed the structure of the row hash and deleted some obsolete private methods