improved litlit rewrite