added initial investment size to wrap function