refactor variable declerations