added language code model and spec test
refactored test