added option and state monads