added FIXME and minor optimization