code and result view implemented and working properly