fixed constructor,names and code style