added freeing-method