This function is mixed identation, will cause problems on some system, please correct