refactor task function
change to sha512