added more code to the inflate part