better(?) lua code for mjolnir