Electronic structure of metal phthalocyanines on Ag (100)