clean up codes in helpers