adding function to create the account hash
using the new function instead of the not working declaration