Adding beforeAdd