cleanup attribute & helper functions