Rough implementation.