refactor structure usage