Adding multi rails support