added scala disposition logic