updated code according to code style and removed unused property