moved all dynamic functions into hp class, index just calles the member-functions to get desired values.