library for handling power plugs