Add support for after and before