added single-pic open func to lib. added some todos