coding style & function update