partial working version
implemented edit page