work for different versions of rails