fixed variables name and code style