minor changes
updated coding style and added spec