added read/write functions for values in pkx