Add before() and after() methods

Signed-off-by: Fadion Dashi <jonidashi@gmail.com>