added config
swap to use emit