added all calls to ast_alloc