add getbasis function to standard.