changed type advantage to return a double