fixing order of methods and constructor