sort of finished lib/psw.lua :d