refracting the mapping
modifying some sql