Make Cost a real type instead of just a simple double