added support for pin power files. could use some cleaning up