switched to initialiser list and member variables