added API functionality