A modified method for elastic properties of nanowires based on surface effect