added conversion function from power to states