domeq: fixed bugs and functionalize