written some new stuff but not working as getCenterItem does not work