removed redundancy, made more readable, fixed constructor etc