added editing function and firebase to reading page