Updating init function to read properly