Adopted to as2-lib