converted back to original code