fix function not implemented error
 bug still exists