updated detailed pic controller